<div>
  <div class="modal-header">
    <h6 class="modal-title" id="modal-basic-title">{{workType === 1 ? 'new HomeWork' : 'edit HomeWork'}}</h6>
    <button type="button" class="close" aria-label="Close" (click)="modal.dismiss('Cross click')">
      <span aria-hidden="true">&times;</span>
    </button>
  </div>
  <div class="modal-body">
    <form [formGroup]="workForm">
      <div class="row">
        <div class="col">
          <div class="input-group mb-3">
            <div class="input-group-prepend mb-3">
              <span class="input-group-text">请选择课程:</span>
            </div>
            <select class="form-control" formControlName="courseid">
              <option *ngFor="let course of courseList" [value]="course.id" [label]="course.course_name"></option>
            </select>
          </div>
        </div>
        <div class="col">
          <div class="input-group mb-3">
            <div class="input-group-prepend">
              <span class="input-group-text">作业名称:</span>
            </div>
            <input class="form-control" id="work_name" placeholder="请填写作业名称" formControlName="work_name"/>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col">
          <div class="input-group mb-3">
            <div class="input-group-prepend mb-3">
              <span class="input-group-text">作业内容:</span>
            </div>
            <input class="form-control" id="centent" placeholder="请填写作业内容" formControlName="centent"/>
          </div>
        </div>
        <div class="col">
          <div class="input-group mb-3">
            <div class="input-group-prepend mb-3">
              <span class="input-group-text text-right">作业期限:</span>
            </div>
            <input class="form-control" id="deadline" placeholder="请填写作业期限" formControlName="deadline"/>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col">
          <div class="btn-group btn-group-toggle" ngbRadioGroup name="radioBasic" formControlName="status">
            <label ngbButtonLabel class="btn-outline-primary">
              <input ngbButton type="radio" [value]="0"> 未完成
            </label>
            <label ngbButtonLabel class="btn-outline-primary">
              <input ngbButton type="radio" [value]="1"> 已完成
            </label>
          </div>
        </div>
      </div>
    </form>
  </div>
  <div class="modal-footer">
    <button class="btn btn-light calendar" (click)="modal.dismiss('Cross click')" type="button">close</button>
    <button type="button" class="btn btn-warning" (click)="saveWork()">Save</button>
  </div>
</div>
